/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 绑定人员到部门 POST /sysDept/bindUsrDept/${param0} */
export async function sysDeptBindUsrDeptDeptIdUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.sysDeptBindUsrDeptDeptIdUsingPostParams;
  body: API.bindUserDeptUsingPOSTUsridlist;
  options?: { [key: string]: unknown };
}) {
  const { deptId: param0, ...queryParams } = params;

  return request<API.xiangyingboolean>(`/sysDept/bindUsrDept/${param0}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 部门id删除部门 POST /sysDept/deleteDeptById */
export async function sysDeptDeleteDeptByIdUsingPost({
  body,
  options,
}: {
  body: number[];
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingboolean>('/sysDept/deleteDeptById', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 部门id获取详情 POST /sysDept/getDeptById */
export async function sysDeptGetDeptByIdUsingPost({
  body,
  options,
}: {
  body: API.SysDeptBo01ee646f6318498b8eb6Fee6cd2ece97;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingSysDeptduixiang>('/sysDept/getDeptById', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 列表查询部门 POST /sysDept/listDept */
export async function sysDeptListDeptUsingPost({
  body,
  options,
}: {
  body: API.SysDeptBod0e4ca47404a4832B3dcAac3fedf51b3;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingListSysDeptduixiang>('/sysDept/listDept', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增部门 POST /sysDept/saveDept */
export async function sysDeptSaveDeptUsingPost({
  body,
  options,
}: {
  body: {};
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingboolean>('/sysDept/saveDept', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询回显绑定/解绑人员部门 GET /sysDept/showDeptUser */
export async function sysDeptShowDeptUserUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.sysDeptShowDeptUserUsingGetParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingListbumenrenyuanxinxi>('/sysDept/showDeptUser', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 树结构查询部门 POST /sysDept/treeDept */
export async function sysDeptTreeDeptUsingPost({
  body,
  options,
}: {
  body: API.SysDeptBo56cf781dAe6a463197a924aea77c3460;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingListSysDeptduixiang>('/sysDept/treeDept', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 解绑人员部门 POST /sysDept/unBindUsrDept/${param0} */
export async function sysDeptUnBindUsrDeptDeptIdUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.sysDeptUnBindUsrDeptDeptIdUsingPostParams;
  body: API.bindUserDeptUsingPOSTUsridlist;
  options?: { [key: string]: unknown };
}) {
  const { deptId: param0, ...queryParams } = params;

  return request<API.xiangyingboolean>(`/sysDept/unBindUsrDept/${param0}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 修改部门 POST /sysDept/updateDept */
export async function sysDeptUpdateDeptUsingPost({
  body,
  options,
}: {
  body: {};
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingboolean>('/sysDept/updateDept', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
